<template>
  <div class="bar_nav_one" v-show="show">
    <div class="bar_nav_two">
      <!-- 左边 -->
      <div @click="fn">
        <slot name="left" ></slot>
      </div>
      <!-- 中间 -->
      <div>
        <slot name="center"></slot>
      </div>
      <!-- 右边 -->
      <div>
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  computed:{
    show(){
      return this.$route.meta.isNav
    },
  },
  methods:{
    fn(){
      this.$router.go(-1)
    }
  }
};
</script>
<style lang="scss">
.bar_nav_one {
  width: 100%;
  height: 3.2rem;
  border-bottom: 1px solid black;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}
.bar_nav_two {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
}
img{
  width: 1.5rem;
  height: 1.5rem;
}
</style>